﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XT.Model;
using XT.Repository;

namespace XT.BusinessService
{
    

    public class UtilityPlaceService : IUtilityPlaceService
    {
        private readonly IUow _uow;
        public UtilityPlaceService(IUow uow)
        {
            _uow = uow;
        }

        public IEnumerable<Utility_Place> getUtilitysByArea(int areaId)
        {
            return _uow.UtilityPlaceRepo.FindAllByCriteria<Utility_Place>((c => c.Area_Id.Equals(areaId)), o => o.OrderByDescending(c => c.Id));
        }
    }
}
